package com.ishansong.ticket.utils;

/**
 * Created by hongtaozhang on 9/17/15.
 */
public enum TaskSyncType {

    GrabSync(0,"抢单同步"),
    InplaceSync(1,"就位同步"),
    PickupSync(2,"取件同步"),
    DeliverySync(3,"收件同步");

    private int type;
    private String typeDesc;

    TaskSyncType(int type, String typeDesc) {

        this.type = type;
        this.typeDesc = typeDesc;

    }

    public int getType() {
        return type;
    }

    public String getTypeDesc() {
        return typeDesc;
    }

    public static TaskSyncType getTaskType(int type){
        TaskSyncType[] taskSyncTypes =TaskSyncType.values();
        for(TaskSyncType taskSyncType:taskSyncTypes){
            if(taskSyncType.getType()==type){
                return taskSyncType;
            }
        }
        return null;
    }


}
